﻿
@{
    ViewBag.Title = "QCArchive";
    Layout = "~/Views/Shared/_LayoutForEUI.cshtml";
    var listColumns = ViewBag.Columns as List<SGArchiveSystem7x.Models.CColumnsModel>;
}
<table id="DestroyArchive_QCArchive_grid" class="easyui-datagrid" style="width:100%;" title="档案列表" data-options="
       rownumbers:true,
       singleSelect:true,
       autoRowHeight:false,
       pagination:true,
       fitColumns:true,
       fit:true,
       striped:true,
       checkOnSelect:false,
       selectOnCheck:false,
       toolbar:'#DestroyArchive_QCArchive_tb',
       collapsible:false,
       pageSize: @SGArchiveSystem7x.Models.CCommonsModels.PageSize,
       pageList:[10,15,20]">
    <thead>
        <tr>
            <th field="ar_name">档案类型</th>
            <th field="DH">档号</th>
            <th field="TM">内容</th>
            <th field="ND">年度</th>
            <th field="bgqxname">保管期限</th>
            <th field="desyear">到期年份</th>
            <th field="dep_name">归档部门</th>
            <th field="gdr">归档人</th>
            <th field="mjname">密级</th>
        </tr>
    </thead>
</table>
<script>
    $(document).ready(function () {
        $('#DestroyArchive_QCArchive_grid').datagrid({
            url: '/DestroyArchive/Get_ajaxQCArchiveList?del=' +@ViewBag.DEL,
            singleSelect: true,
            method: 'post',
            onLoadSuccess: function (data) {
                $('.pagination-page-list').hide();
            }
        });
        InitPagenation()
    });
    ///初始化分页
    function InitPagenation() {
        //设置分页控件
        var p = $('#DestroyArchive_QCArchive_grid').datagrid('getPager');
        $(p).pagination({
            onSelectPage: function (pageNumber, pageSize) {
                QueryPager(pageNumber, pageSize);
            }
        });
    }
    ///分页查询
    function QueryPager(num, size) {
        $('#DestroyArchive_QCArchive_grid').datagrid('options').url = '/DestroyArchive/Get_ajaxQCArchiveListPager?num=' + num + '&size=' + size;
        $('#DestroyArchive_QCArchive_grid').datagrid('reload');
        $('#DestroyArchive_QCArchive_grid').datagrid('options').pageNumber = num;
        $('#DestroyArchive_QCArchive_grid').datagrid('options').pageSize = size;
        return;
    }
</script>
